package rush.edu.wechat.admin.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * 通过 tomcat启动
 * Created by hmily on 2017/8/30.
 */
@EnableConfigurationProperties
@SpringBootApplication
@ComponentScan(basePackages = "rush.edu.wechat")
public class AppLoader extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(AppLoader.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(AppLoader.class);
    }


}
